package com.example.narratejpa.repository;

import com.example.narratejpa.entiy.Region;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface RegionRepository extends JpaRepository<Region,Integer>{
    @Modifying
    @Transactional
    @Query("delete from Region r where r.id in (?1)")
    void deleteBatch(List<Integer> ids);
}
